(function() { var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};templates['base-layout'] = template(function (Handlebars,depth0,helpers,partials,data) {
  this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
  


  return "<div id=\"header\" class=\"container\"></div>\n<div class=\"clearfix\"></div>\n<div id=\"body\" class=\"container rounded\">\n    <div class=\"row\">\n        <div class=\"sidebar\">\n        </div>\n        <div class=\"main-content\">\n            <div class=\"page-content\">\n            </div>\n        </div>\n    </div>\n</div>\n<div id=\"footer\" class=\"container\"></div>";
  } ); })();(function() { var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};templates['footer'] = template(function (Handlebars,depth0,helpers,partials,data) {
  this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
  


  return "<div style=\"text-align: center;margin: 10px 0px 30px 0px;\">Univerisdad Peruana de Ciencias aplicadas - EPE - DEW - 2013-1-M0</div>\n";
  } ); })();(function() { var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};templates['header'] = template(function (Handlebars,depth0,helpers,partials,data) {
  this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
  var buffer = "", stack1, stack2, functionType="function", escapeExpression=this.escapeExpression, self=this;

function program1(depth0,data) {
  
  var buffer = "", stack1;
  buffer += "\n                <li>\n                    <a href=\"\">";
  if (stack1 = helpers.text) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
  else { stack1 = depth0.text; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
  buffer += escapeExpression(stack1)
    + "</a>\n                    ";
  stack1 = helpers['if'].call(depth0, depth0.showSeparator, {hash:{},inverse:self.noop,fn:self.program(2, program2, data),data:data});
  if(stack1 || stack1 === 0) { buffer += stack1; }
  buffer += "\n                </li>\n            ";
  return buffer;
  }
function program2(depth0,data) {
  
  
  return "<div class=\"nav-separator\"></div>";
  }

  buffer += "<div class=\"header\">\n    <img src=\""
    + escapeExpression(((stack1 = ((stack1 = depth0.logo),stack1 == null || stack1 === false ? stack1 : stack1.src)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
    + "\" class=\"pull-left\" alt=\""
    + escapeExpression(((stack1 = ((stack1 = depth0.logo),stack1 == null || stack1 === false ? stack1 : stack1.alt)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
    + "\"/>\n    <div class=\"pull-right\">\n        <ul class=\"nav\">\n            <li class=\"nav-starter\">&nbsp;</li>\n            ";
  stack2 = helpers.each.call(depth0, depth0.enlaces, {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
  if(stack2 || stack2 === 0) { buffer += stack2; }
  buffer += "\n            <li class=\"nav-finisher\">&nbsp;</li>\n        </ul>\n    </div>\n</div>";
  return buffer;
  } ); })();(function() { var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};templates['list'] = template(function (Handlebars,depth0,helpers,partials,data) {
  this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
  


  return "<div class=\"page-header  position-relative\">\n    <h1>Lista de locales</h1>\n</div>\n<div class=\"row\">\n    <div class=\"col-md-3\">\n        <div class=\"thumbnail\" style=\"min-height: 240px;position: relative;\">\n            <a href=\"\">\n                <img alt=\"Sapito\" src=\"images/lps-0501.jpg\">\n            </a>\n            <h5><a href=\"\">LOCAL 1</a></h5>\n            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore</p>\n            <div class=\"info-days\">\n                <div class=\"left\">\n                    5 entradas / 3 segundos\n                </div>\n                <div class=\"clear\"></div>\n            </div>\n        </div>\n    </div>\n    <div class=\"col-md-3\">\n        <div class=\"thumbnail\" style=\"min-height: 240px;position: relative;\">\n            <a href=\"\">\n                <img alt=\"Sapito\" src=\"images/lps-0501.jpg\">\n            </a>\n            <h5><a href=\"\">LOCAL 2</a></h5>\n            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore</p>\n            <div class=\"info-days\">\n                <div class=\"left\">\n                    5 entradas / 3 segundos\n                </div>\n                <div class=\"clear\"></div>\n            </div>\n        </div>\n    </div>\n    <div class=\"col-md-3\">\n        <div class=\"thumbnail\" style=\"min-height: 240px;position: relative;\">\n            <a href=\"\">\n                <img alt=\"Sapito\" src=\"images/lps-0501.jpg\">\n            </a>\n            <h5><a href=\"\">LOCAL 3</a></h5>\n            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore</p>\n            <div class=\"info-days\">\n                <div class=\"left\">\n                    5 entradas / 3 segundos\n                </div>\n                <div class=\"clear\"></div>\n            </div>\n        </div>\n    </div>\n    <div class=\"col-md-3\">\n        <div class=\"thumbnail\" style=\"min-height: 240px;position: relative;\">\n            <a href=\"\">\n                <img alt=\"Sapito\" src=\"images/lps-0501.jpg\">\n            </a>\n            <h5><a href=\"\">LOCAL 4</a></h5>\n            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore</p>\n            <div class=\"info-days\">\n                <div class=\"left\">\n                    5 entradas / 3 segundos\n                </div>\n                <div class=\"clear\"></div>\n            </div>\n        </div>\n    </div>\n</div>";
  } ); })();(function() { var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};templates['sidebar'] = template(function (Handlebars,depth0,helpers,partials,data) {
  this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
  


  return "    <ul class=\"nav nav-pills nav-stacked\">\n        <li class=\"active\"><a href=\"#overview\"><i class=\"icon-chevron-right\"></i> Categoria 1</a></li>\n        <li><a href=\"#transitions\"><i class=\"icon-chevron-right\"></i> Categoria 2</a></li>\n        <li><a href=\"#modals\"><i class=\"icon-chevron-right\"></i> Categoria 3</a></li>\n        <li><a href=\"#dropdowns\"><i class=\"icon-chevron-right\"></i> Categoria 4</a></li>\n        <li><a href=\"#scrollspy\"><i class=\"icon-chevron-right\"></i> Categoria 5</a></li>\n        <li><a href=\"#tabs\"><i class=\"icon-chevron-right\"></i> Categoria 6</a></li>\n        <li><a href=\"#tooltips\"><i class=\"icon-chevron-right\"></i> Categoria 7</a></li>\n        <li><a href=\"#popovers\"><i class=\"icon-chevron-right\"></i> Categoria 8</a></li>\n        <li><a href=\"#alerts\"><i class=\"icon-chevron-right\"></i> Categoria 9</a></li>\n        <li><a href=\"#buttons\"><i class=\"icon-chevron-right\"></i> Categoria 10</a></li>\n        <li><a href=\"#collapse\"><i class=\"icon-chevron-right\"></i> Categoria 11</a></li>\n        <li><a href=\"#carousel\"><i class=\"icon-chevron-right\"></i> Categoria 12</a></li>\n        <li><a href=\"#typeahead\"><i class=\"icon-chevron-right\"></i> Categoria 13</a></li>\n        <li><a href=\"#affix\"><i class=\"icon-chevron-right\"></i> Categoria 14</a></li>\n    </ul>";
  } ); })();DEW.BaseLayout = Backbone.View.extend({

    template : Handlebars.templates['base-layout'],

    render: function(){
        this.$el.html(this.template({}));
    }
});DEW.Footer = Backbone.View.extend({

    template: Handlebars.templates['footer'],

    initialize: function() {
        //Aqui se puede poner configuracion inicial
    },

    render: function() {
        this.$el.html(this.template({
            //Algun parametro que le querramos configurar
        }));
    }
});DEW.Header = Backbone.View.extend({

    template: Handlebars.templates['header'],

    initialize: function() {
        //Aqui se puede poner configuracion inicial
    },

    render: function() {
        this.$el.html(this.template({
            //Algun parametro que le querramos configurar
            logo: this.options.logo,
            enlaces: this.options.enlaces
        }));
    }

});DEW.List = Backbone.View.extend({

    template: Handlebars.templates['list'],

    initialize: function() {
        //Aqui se puede poner configuracion inicial
    },

    render: function() {
        this.$el.html(this.template({
            //Algun parametro que le querramos configurar
        }));
    }
});DEW.Sidebar = Backbone.View.extend({

    template: Handlebars.templates['sidebar'],

    initialize: function() {
        //Aqui se puede poner configuracion inicial
    },

    render: function() {
        this.$el.html(this.template({
            //Algun parametro que le querramos configurar
        }));
    }
});DEW.BaseLayoutController = function() {};

$.extend(DEW.BaseLayoutController.prototype, {
    render: function() {
        this.displayLayout();
        this.displayHeader();
        this.displayBody();
        this.displayFooter();
    },

    displayLayout: function() {
        var baseLayout = new DEW.BaseLayout();
        baseLayout.render();
        $(baseLayout.el).appendTo("#content");
    },

    displayHeader: function() {
        var header = new DEW.Header({
            logo: {
                src: 'images/logo.jpg',
                alt: 'Logo'
            },
            enlaces: [{
                text: 'Enlace 1',
                showSeparator: true
            },{
                text: 'Enlace 2',
                showSeparator: true
            },{
                text: 'Enlace 3',
                showSeparator: true
            },{
                text: 'Enlace 4',
                showSeparator: true
            },{
                text: 'Enlace 5',
                showSeparator: false
            }]
        });
        header.render();
        $(header.el).appendTo("#header");
    },

    displayBody: function() {
        var sidebar = new DEW.Sidebar();
        sidebar.render();
        $(sidebar.el).appendTo(".sidebar");

        var list = new DEW.List();
        list.render();
        $(list.el).appendTo(".page-content");
    },

    displayFooter: function() {
        var footer = new DEW.Footer();
        footer.render();
        $(footer.el).appendTo("#footer");
    }

});DEW.appRouter = Backbone.Router.extend({
    routes: {
        "*actions" : "defaultRoute"
    },
    initialize: function()
    {

    },

    displayLayout: function() {
        var baseLayoutController = new DEW.BaseLayoutController();
        baseLayoutController.render();
    },

    defaultRoute: function(path) {
        this.displayLayout();
    }
});